#include <iostream>
#include <vector>
using namespace std;

class Teacher
{
public:
    Teacher(int age)
    {
        this->age = age;
    };
    ~Teacher(){};

public:
    int age;
};

int main()
{
    cout << "hello" << endl;
    vector<Teacher> v; //存储 Teacher 类型数据的容器
    Teacher t1(10), t2(20), t3(30);
    v.push_back(t1);
    v.push_back(t2);
    v.push_back(t3);
    vector<Teacher>::iterator pStart = v.begin();
	vector<Teacher>::iterator pEnd = v.end();
    //通过迭代器遍历
	while (pStart != pEnd){
		cout << pStart->age << " ";
		pStart++;
	}


    system("pause");
    return 0;
}